
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<span style="font-size:18px;">
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="approvalProcess/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="approvalProcess/css/commonly-used-show.css" />
    <script type="text/javascript" src="approvalProcess/js/jquery.min.js"></script>
    <script type="text/javascript" src="approvalProcess/js/bootstrap.js" ></script>
 <script type="text/javascript" src="approvalProcess/js/jquery.cookie.js"></script>

    <title>资讯详情</title>

</head>

<body class="mybody">

<c:if test="${user_leve == 0}">
    <jsp:include page="theTopMenuAdmin.jsp" />
</c:if>

<c:if test="${user_leve == 1}">
    <jsp:include page="theTopMenuTeacher.jsp" />
</c:if>

<c:if test="${user_leve == 2}">
    <jsp:include page="theTopMenuUser.jsp" />
</c:if>

<c:if test="${user_leve == 3}">
    <jsp:include page="theTopMenuCollege.jsp" />
</c:if>

<c:if test="${user_leve == 4}">
    <jsp:include page="theTopMenuSchool.jsp" />
</c:if>

<c:if test="${user_leve == 5}">
    <jsp:include page="theTopMenuDoorkeeper.jsp" />
</c:if>


<div class="container" >
    <div class="frame">
        <h3 style="text-align: center">查看详情</h3>
        <hr style="filter: alpha(opacity=100,finishopacity=0,style=3)" width="100%" color="#6f5999" size="3"/>

        <div style="margin-left: 10%; margin-right: 10%;">

            <div class="text-center"> <span id="new_title" ></span></div>


            <textarea id="text_content" style="resize: none; width: 100%; height: 80%; border:0px; padding: 50px" disabled></textarea>

            <div class="text-center" style="margin-top: 20px;">
                <span id="user_messge" style="font-size:18px; color: red;"></span>
            </div>

        </div>



    </div>
</div>

<br><br>

<script type="text/javascript">
    var userdt = JSON.parse(sessionStorage.getItem("user"));
    if (userdt.result.userName != null){
        $("#usname").text(userdt.result.userName);
    }else {
        $("#usname").text(userdt.result.userLoginName);
    }

    window.onload = function(){
        newsInfo();
    }

    function newsInfo(){
        var postUrl = "${pageContext.request.contextPath}/member/selectStripNews";
        var str = {
            "id": "${param.id}"
        };

        $.ajax({
            type:"post",
            url:postUrl,
            headers: {
                "Content-Type":"application/json"
            },
            data:JSON.stringify(str),
            contentType: "application/json; charset=utf-8",
            dataType:"json",
            success:function(data){
                if (data.status == "0"){
                    $("#user_messge").text(data.msg);
                }else {
                    $("#new_title").append(data.result.newsTitle);
                    $("#text_content").append(data.result.newsContent);

                }
            },
            error:function(xhr,state,errorThrown){
                //alert("发生网络错误，错误码为：" + xhr.status)
                location.href = "${pageContext.request.contextPath}/error";
            }
        });
    }

</script>

</body>
</html>
</span>